3.26 \(\int \frac{1+a x}{x \sqrt{a x} \sqrt{1-a x}} \, dx\)

Optimal. Leaf size=29 \[ -\frac{2 \sqrt{1-a x}}{\sqrt{a x}}-\sin ^{-1}(1-2 a x) \]

[Out]

(-2*Sqrt[1 - a*x])/Sqrt[a*x] - ArcSin[1 - 2*a*x]

________________________________________________________________________________________

Rubi [A]  time = 0.0160123, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.192, Rules used = {16, 78, 53, 619, 216} \[ -\frac{2 \sqrt{1-a x}}{\sqrt{a x}}-\sin ^{-1}(1-2 a x) \]

Antiderivative was successfully verified.

[In]

Int[(1 + a*x)/(x*Sqrt[a*x]*Sqrt[1 - a*x]),x]

[Out]

(-2*Sqrt[1 - a*x])/Sqrt[a*x] - ArcSin[1 - 2*a*x]

Rule 16

Int[(u_.)*(v_)^(m_.)*((b_)*(v_))^(n_), x_Symbol] :> Dist[1/b^m, Int[u*(b*v)^(m + n), x], x] /; FreeQ[{b, n}, x
] && IntegerQ[m]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> -Simp[((b*e - a*f
)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(f*(p + 1)*(c*f - d*e)), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1)
+ c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f,
 n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ
[p, n]))))

Rule 53

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Int[1/Sqrt[a*c - b*(a - c)*x - b^2*x^2]
, x] /; FreeQ[{a, b, c, d}, x] && EqQ[b + d, 0] && GtQ[a + c, 0]

Rule 619

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*((-4*c)/(b^2 - 4*a*c))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rule 216

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[(Rt[-b, 2]*x)/Sqrt[a]]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rubi steps

\begin{align*} \int \frac{1+a x}{x \sqrt{a x} \sqrt{1-a x}} \, dx &=a \int \frac{1+a x}{(a x)^{3/2} \sqrt{1-a x}} \, dx\\ &=-\frac{2 \sqrt{1-a x}}{\sqrt{a x}}+a \int \frac{1}{\sqrt{a x} \sqrt{1-a x}} \, dx\\ &=-\frac{2 \sqrt{1-a x}}{\sqrt{a x}}+a \int \frac{1}{\sqrt{a x-a^2 x^2}} \, dx\\ &=-\frac{2 \sqrt{1-a x}}{\sqrt{a x}}-\frac{\operatorname{Subst}\left (\int \frac{1}{\sqrt{1-\frac{x^2}{a^2}}} \, dx,x,a-2 a^2 x\right )}{a}\\ &=-\frac{2 \sqrt{1-a x}}{\sqrt{a x}}-\sin ^{-1}(1-2 a x)\\ \end{align*}

Mathematica [A]  time = 0.0239233, size = 53, normalized size = 1.83 \[ \frac{2 \left (a x+\sqrt{a} \sqrt{x} \sqrt{1-a x} \sin ^{-1}\left (\sqrt{a} \sqrt{x}\right )-1\right )}{\sqrt{-a x (a x-1)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + a*x)/(x*Sqrt[a*x]*Sqrt[1 - a*x]),x]

[Out]

(2*(-1 + a*x + Sqrt[a]*Sqrt[x]*Sqrt[1 - a*x]*ArcSin[Sqrt[a]*Sqrt[x]]))/Sqrt[-(a*x*(-1 + a*x))]

________________________________________________________________________________________

Maple [C]  time = 0.016, size = 69, normalized size = 2.4 \begin{align*}{{\it csgn} \left ( a \right ) \left ( \arctan \left ({\frac{{\it csgn} \left ( a \right ) \left ( 2\,ax-1 \right ) }{2}{\frac{1}{\sqrt{-x \left ( ax-1 \right ) a}}}} \right ) xa-2\,\sqrt{-x \left ( ax-1 \right ) a}{\it csgn} \left ( a \right ) \right ) \sqrt{-ax+1}{\frac{1}{\sqrt{ax}}}{\frac{1}{\sqrt{-x \left ( ax-1 \right ) a}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*x+1)/x/(a*x)^(1/2)/(-a*x+1)^(1/2),x)

[Out]

(arctan(1/2*csgn(a)*(2*a*x-1)/(-x*(a*x-1)*a)^(1/2))*x*a-2*(-x*(a*x-1)*a)^(1/2)*csgn(a))*(-a*x+1)^(1/2)*csgn(a)
/(a*x)^(1/2)/(-x*(a*x-1)*a)^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/x/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.31399, size = 111, normalized size = 3.83 \begin{align*} -\frac{2 \,{\left (a x \arctan \left (\frac{\sqrt{a x} \sqrt{-a x + 1}}{a x}\right ) + \sqrt{a x} \sqrt{-a x + 1}\right )}}{a x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/x/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="fricas")

[Out]

-2*(a*x*arctan(sqrt(a*x)*sqrt(-a*x + 1)/(a*x)) + sqrt(a*x)*sqrt(-a*x + 1))/(a*x)

________________________________________________________________________________________

Sympy [C]  time = 10.317, size = 71, normalized size = 2.45 \begin{align*} a \left (\begin{cases} - \frac{2 i \operatorname{acosh}{\left (\sqrt{a} \sqrt{x} \right )}}{a} & \text{for}\: \left |{a x}\right | > 1 \\\frac{2 \operatorname{asin}{\left (\sqrt{a} \sqrt{x} \right )}}{a} & \text{otherwise} \end{cases}\right ) + \begin{cases} - 2 \sqrt{-1 + \frac{1}{a x}} & \text{for}\: \frac{1}{\left |{a x}\right |} > 1 \\- 2 i \sqrt{1 - \frac{1}{a x}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/x/(a*x)**(1/2)/(-a*x+1)**(1/2),x)

[Out]

a*Piecewise((-2*I*acosh(sqrt(a)*sqrt(x))/a, Abs(a*x) > 1), (2*asin(sqrt(a)*sqrt(x))/a, True)) + Piecewise((-2*
sqrt(-1 + 1/(a*x)), 1/Abs(a*x) > 1), (-2*I*sqrt(1 - 1/(a*x)), True))

________________________________________________________________________________________

Giac [A]  time = 2.97911, size = 59, normalized size = 2.03 \begin{align*} -\frac{\sqrt{-a x + 1} - 1}{\sqrt{a x}} + \frac{\sqrt{a x}}{\sqrt{-a x + 1} - 1} + 2 \, \arcsin \left (\sqrt{a x}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/x/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="giac")

[Out]

-(sqrt(-a*x + 1) - 1)/sqrt(a*x) + sqrt(a*x)/(sqrt(-a*x + 1) - 1) + 2*arcsin(sqrt(a*x))